package com.test.date.mydate;

import org.joda.time.DateTimeZone;
import org.joda.time.LocalDateTime;

import java.util.Date;

/**
 * @Description:
 * @Author: yangzhiwei
 * @Date: 2021/3/8 17:03
 */
public class MyDate {
    public static MyDate NOW = new MyDate();
    private int year;
    private int month;
    private int day;
    private int hour;
    private int minute;
    private int second;
    private int milliseconds;

    private int weak;
    private int weakDay;

    public MyDate() {
        Long milliSeconds = System.currentTimeMillis();
        //1.615.195.270.317
        int millsecond = milliseconds % 1000; milliSeconds = milliSeconds / 1000;
        int seconds = milliseconds % 60; milliSeconds = milliSeconds / 60;

    }

    public static void main(String[] args) {
        Date date = new Date();
        date.getDay();
        System.out.println(System.currentTimeMillis());
        LocalDateTime localDateTime = LocalDateTime.now();
        System.out.println(localDateTime);
        System.out.println("era" + localDateTime.getEra());
        System.out.println(localDateTime.getCenturyOfEra());
        System.out.println(localDateTime.getChronology().getZone());
        System.out.println(localDateTime.size());
        System.out.println(localDateTime.getChronology().withZone(DateTimeZone.UTC));
        System.out.println(localDateTime);
        System.out.println(DateTimeZone.getDefault());
        System.out.println(DateTimeZone.getAvailableIDs());
        //System.out.println(localDateTime.);


        //指定时区
        LocalDateTime localDateTime1 = new LocalDateTime(DateTimeZone.UTC);
        System.out.println(localDateTime1);

        //System.out.println(localDateTime.get);
        // https://cloud.tencent.com/developer/ask/182200
//        java.sql.Date date1 = new java.sql.Date(System.currentTimeMillis());
//        System.out.println(date1);
       // DateTimeZone dateTimeZone = DateTimeZone.setDefault();
        System.out.println();

    }

}
